From b6eb51444c12dd4bd949d806804184f519ce1287 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 4 Apr 2008 10:18:45 +0100 Subject: [PATCH] xm: When dumping core of an errant domain do not unpause after the dump. This could allow the domain to e.g., access disks after fail-over. Signed-off-by: Masaki Kanno --- tools/python/xen/xm/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/python/xen/xm/main.py b/tools/python/xen/xm/main.py index 8a161e6f7f..f5ad85d381 100644 --- a/tools/python/xen/xm/main.py +++ b/tools/python/xen/xm/main.py @@ -1294,14 +1294,14 @@ def xm_dump_core(args): try: print "Dumping core of domain: %s ..." % str(dom) server.xend.domain.dump(dom, filename, live, crash) + + if crash: + print "Destroying domain: %s ..." % str(dom) + server.xend.domain.destroy(dom) finally: - if not live and ds == DOM_STATE_RUNNING: + if not live and not crash and ds == DOM_STATE_RUNNING: server.xend.domain.unpause(dom) - if crash: - print "Destroying domain: %s ..." % str(dom) - server.xend.domain.destroy(dom) - def xm_rename(args): arg_check(args, "rename", 2) -- 2.30.2